package com.chd.driversystem.domain;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;

import java.util.Date;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Index;
import org.greenrobot.greendao.annotation.NotNull;

/**
 * Created by shawnfly on 17-5-2.
 */
@Entity(indexes = {@Index(value = "id ASC",unique = true)})
public class Oil {
    @Id(autoincrement = true)
    private Long id;
    @NotNull
    private Long userId;
    private Date createDate;
    private Double fuel;//今日耗油
    private Double oilLevel;//剩余油量
    private Double totalFuel;//月总耗油量
    private Double aveFuel;//月均耗油量
    @Generated(hash = 1014744566)
    public Oil(Long id, @NotNull Long userId, Date createDate, Double fuel,
            Double oilLevel, Double totalFuel, Double aveFuel) {
        this.id = id;
        this.userId = userId;
        this.createDate = createDate;
        this.fuel = fuel;
        this.oilLevel = oilLevel;
        this.totalFuel = totalFuel;
        this.aveFuel = aveFuel;
    }
    @Generated(hash = 765681972)
    public Oil() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getUserId() {
        return this.userId;
    }
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Date getCreateDate() {
        return this.createDate;
    }
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    public Double getFuel() {
        return this.fuel;
    }
    public void setFuel(Double fuel) {
        this.fuel = fuel;
    }
    public Double getOilLevel() {
        return this.oilLevel;
    }
    public void setOilLevel(Double oilLevel) {
        this.oilLevel = oilLevel;
    }
    public Double getTotalFuel() {
        return this.totalFuel;
    }
    public void setTotalFuel(Double totalFuel) {
        this.totalFuel = totalFuel;
    }
    public Double getAveFuel() {
        return this.aveFuel;
    }
    public void setAveFuel(Double aveFuel) {
        this.aveFuel = aveFuel;
    }

    @Override
    public String toString() {
        return "Oil{" +
                "id=" + id +
                ", userId=" + userId +
                ", createDate=" + createDate +
                ", fuel=" + fuel +
                ", oilLevel=" + oilLevel +
                ", totalFuel=" + totalFuel +
                ", aveFuel=" + aveFuel +
                '}';
    }
}
